package com.shop.service;

import com.shop.common.SetMeta;
import com.shop.entity.Good;
import com.shop.exception.GoodException;

public interface GoodService {
    /**
     * 商品列表数据
     * @param query
     * @param pagenum
     * @param pagesize
     * @return
     * @throws GoodException
     */
    SetMeta selectPageGood(String query, Integer pagenum, Integer pagesize) throws GoodException;

    /**
     * 添加商品
     * @param good
     * @return
     * @throws GoodException
     */
    SetMeta insertGood(Good good) throws GoodException;

    /**
     * 根据Id查询商品
     * @param id
     * @return
     * @throws GoodException
     */
    SetMeta selectGood(Integer id) throws GoodException;

    /**
     * 编辑提交商品
     * @param good
     * @return
     * @throws GoodException
     */
    SetMeta updateGood(Good good) throws GoodException;

    /**
     * 删除商品
     * @param id
     * @return
     */
    SetMeta deleteGood(Integer id) throws GoodException;
}
